<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>ZendWind - Zendwind</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Zendwind">

    <!-- Le styles -->
    <link rel="stylesheet" href="../theme/css/bootstrap.min.css" type="text/css" />
    <style type="text/css">
      body {
        padding-top: 60px;
        padding-bottom: 40px;
      }
      .sidebar-nav {
        padding: 9px 0;
      }
      .tag-1 {
        font-size: 13pt;
      }
      .tag-2 {
        font-size: 10pt;
      }
      .tag-2 {
        font-size: 8pt;
      }
      .tag-4 {
        font-size: 6pt;
     }
    </style>
    <link href="../theme/css/bootstrap-responsive.min.css" rel="stylesheet">
        <link href="../theme/css/font-awesome.css" rel="stylesheet">

    <link href="../theme/css/pygments.css" rel="stylesheet">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../theme/images/favicon.ico">
    <link rel="apple-touch-icon" href="../theme/images/apple-touch-icon.png">
    <link rel="apple-touch-icon" sizes="72x72" href="../theme/images/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="114x114" href="../theme/images/apple-touch-icon-114x114.png">

    <link href="../" type="application/atom+xml" rel="alternate" title="ZendWind ATOM Feed" />
    <link href="../feeds/all.rss.xml" type="application/atom+xml" rel="alternate" title="ZendWind RSS Feed" />

  </head>

  <body>

    <div class="navbar navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container-fluid">
          <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </a>
          <a class="brand" href="../index.html">ZendWind </a>
          <div class="nav-collapse">
            <ul class="nav">
                  <li><a href="http://www.zendwind.com"><font color="#58ACFA">主页</font></a></li>
                  <li><a href="http://www.zendwind.com/category/c.html"><font color="#58ACFA">C/C++</font></a></li>
                  <li><a href="http://www.zendwind.com"><font color="#58ACFA">Linux</font></a></li>
                  <li><a href="http://www.zendwind.com/category/python.html"><font color="#58ACFA">Python</font></a></li>
                  <li><a href="http://www.zendwind.com/feeds/all.atom.xml"><font color="#58ACFA">Feed</font></a></li>
                  <li><a href="http://www.zendwind.com"><font color="#58ACFA">生活杂谈</font></a></li>
                  <li><a href="http://www.zendwind.com/category/about.html"><font color="#58ACFA">About</font></a></li>
                          <li class="divider-vertical"></li>
		    </ul>
            <!--<p class="navbar-text pull-right">Logged in as <a href="#">username</a></p>-->
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>

    <div class="container-fluid">
      <div class="row">
        <div class="span9" id="content">
        <div class="article">
                <h1><a href="../pages/2014/01/10/pygame_bb.html">Pygame之兔獾大战</a></h1>
                <div class="well small"><footer class="post-info">
<span class="label">Date</span>
<abbr class="published" title="2014-01-10T00:00:00">
        <i class="icon-calendar"></i>周五 10 一月 2014
</abbr>
<span class="label">By</span>
<a href="../author/zendwind.html"><i class="icon-user"></i>Zendwind</a>
<!--
<span class="label">Category</span>
<a href="../category/python.html"><i class="icon-folder-open"></i>Python</a>.
-->

<span class="label">Tags</span>
	<a href="../tag/pygame.html"><i class="icon-tag"></i>pygame</a>
</footer><!-- /.post-info --></div>
                <div class="summary"><h3>Pygame-依葫芦画瓢之兔獾大战</h3>
<p><hr>
前几天看到国外一个12岁的孩子写的兔獾大战游戏，心生敬佩，想当年我还是12岁的时候还不知电脑为何物，连小霸王都未曾玩过。自己也未曾想去搞游戏开发，纯属自娱自乐。在此心态下，依葫芦画瓢重新架构了一下该游戏。</p>
<p><strong>1. 参考资料</strong></p>
<p>1.<a href="http://www.cnblogs.com/dukeleo/p/3339780.html">Kill Console 的PC版微信打飞机</a></p>
<p>2.<a href="http://www.oschina.net/translate/beginning-game-programming-for-teens-with-python">Garfielt 翻译的青少年如何使用 Python 开始游戏开发</a></p>
<p><strong>2. 游戏介绍</strong></p>
<p>此游戏基本思想是兔子和敌人獾之间的战斗故事，兔子需要保护自己的窝（城堡）不被獾侵入，通过自己的武器（箭）杀死来犯之敌。在此过程中，兔子可通过杀死的敌人数累积自己的分数值，如果分数累加到设定Win值，则GameWin；箭碰到獾之后，检测是否击中（检测碰撞区域），如果击中则獾和箭同时消失；獾随机生成，并以一定的速度向城堡进攻，如果与兔子相撞，则GameOver，否则当进入城堡后（检测碰撞区域）随机降低城堡的生命值，当城堡生命值降为零时GameOver。</p>
<p><strong>3.精灵介绍</strong></p>
<p>从上述游戏介绍中，我们可知游戏基本精灵有：兔子 ...</p>
                        <a class="btn primary xsmall" href="../pages/2014/01/10/pygame_bb.html">more ...</a>
                </div>
        </div>
        <hr />
        <div class="article">
                <h1><a href="../pages/2014/01/06/django_install_win.html">Django 1.6 在Windows平台下的配置</a></h1>
                <div class="well small"><footer class="post-info">
<span class="label">Date</span>
<abbr class="published" title="2014-01-06T00:00:00">
        <i class="icon-calendar"></i>周一 06 一月 2014
</abbr>
<span class="label">By</span>
<a href="../author/zendwind.html"><i class="icon-user"></i>Zendwind</a>
<!--
<span class="label">Category</span>
<a href="../category/python.html"><i class="icon-folder-open"></i>Python</a>.
-->

<span class="label">Tags</span>
	<a href="../tag/django.html"><i class="icon-tag"></i>Django</a>
</footer><!-- /.post-info --></div>
                <div class="summary"><h2>Django 1.6 在Windows平台下的配置</h2>
<p><strong>前言</strong></p>
<p>最近两天研究了下<code>Django1.6</code>在Windows平台中的配置安装，服务器采用Apache。期间遇到过许多新手所遇到的各种问题，也算是一种宝贵经历，问题原因主要是关于新版Django静态文件的配置问题，尤其是media和static两种文件的混淆。网上很多教程都是基于比较老的版本所写，导致配置思路有差异，最有价值的内容当属<a href="http://docs.djangoproject.com/en/1.6/">Django官网</a>的参考资料，值得细读。</p>
<p><strong>配置环境</strong></p>
<p><strong><em>Python</em></strong>：2.7.6</p>
<p><strong><em>Apache</em></strong>: 2.2</p>
<p><strong><em>Django</em></strong>: 1.6</p>
<p><strong><em>OS</em></strong>: windows 7</p>
<p><strong>目录</strong></p>
<ul>
<li><a href="#install_python">Python安装</a><ul>
<li><a href="#install_py_soft">Python软件安装</a></li>
<li><a href="#install_py_packages">Python包安装</a></li>
</ul>
</li>
<li><a href="#apache_install">Apache安装</a></li>
<li><a href="#django_install">Django安装</a><ul>
<li><a href="#django_download">Django下载</a></li>
<li><a href="#wsgi_config">Mod_WSGI配置</a></li>
</ul>
</li>
<li><a href="#django_project">Django工程创建</a><ul>
<li><a href="#crate_project">创建工程</a></li>
<li><a href="#config_setting">Settings.py设置</a> </li>
<li><a href="#config_wsgi">wsgi.py设置</a></li>
<li><a href="#config_apache">apache配置</a></li>
<li><a href="#test_project">测试工程 ...</a></li></ul></li></ul>
                        <a class="btn primary xsmall" href="../pages/2014/01/06/django_install_win.html">more ...</a>
                </div>
        </div>
        <hr />
        <div class="article">
                <h1><a href="../pages/2014/01/06/eclipse_pydev.html">eclipse配置python开发环境</a></h1>
                <div class="well small"><footer class="post-info">
<span class="label">Date</span>
<abbr class="published" title="2014-01-06T00:00:00">
        <i class="icon-calendar"></i>周一 06 一月 2014
</abbr>
<span class="label">By</span>
<a href="../author/zendwind.html"><i class="icon-user"></i>Zendwind</a>
<!--
<span class="label">Category</span>
<a href="../category/python.html"><i class="icon-folder-open"></i>Python</a>.
-->

<span class="label">Tags</span>
	<a href="../tag/eclipse.html"><i class="icon-tag"></i>eclipse</a>
</footer><!-- /.post-info --></div>
                <div class="summary"><p><strong>摘要</strong>：每天也会上园子瞧瞧，但却好久没动笔了。感慨现在走的路有点偏离原来的预想，以至于无法全身心投入对心向神往的语言作进一步的研究。但仍无法就此放弃，还是希望能延续自己的梦想。今天抽了点时间出来研究了下ubuntu下python IDE环境的配置，希望能给自己一个良好的开始。</p>
<p><strong>目录</strong>：</p>
<ul>
<li><a href="#env_introduction">KDE 环境介绍</a><ul>
<li><a href="#install_env">安装环境</a></li>
<li><a href="#install_step">安装步骤</a><ul>
<li><a href="#install_jre">JRE安装</a></li>
<li><a href="#install_eclipse">Eclipse安装</a></li>
<li><a href="#install_pydev">PyDev安装</a></li>
</ul>
</li>
<li><a href="#install_problem">安装问题</a></li>
</ul>
</li>
</ul>
<h1 id="install_env">安装环境</h1>

<p>目前Linux下用于Pytho开发的IDE环境有很多，像wxPython,ActivePython,Komodo这些NX的环境等。在这里，由于考虑到以后项目的需要，所选IDE环境为Eclipse+PyDev,这个环境不是最好，但用得也是比较广泛的。
<h1 id="install_step">安装步骤</h1>
<h2 id="install_jre">JRE 安装</h2>
Eclipse需要Java运行环境的支撑，一般有JRE和JDK.具体安装哪个根据个人需要。这里主要考虑JRE的安装。Windows下的JRE直接到官网下载后点击安装即可。在Ubuntu下安装文件此处下的是后缀为.bin的文件，版本：<code>sun-java6-jre</code>,文件名：<code>jre-6u27-linux-i586.bin</code>,安装文件很容易下载，版本各取所需，推荐：<code>www.java ...</code></p>
                        <a class="btn primary xsmall" href="../pages/2014/01/06/eclipse_pydev.html">more ...</a>
                </div>
        </div>
        <hr />
        <div class="article">
                <h1><a href="../pages/2013/11/28/about-me.html">关于我</a></h1>
                <div class="well small"><footer class="post-info">
<span class="label">Date</span>
<abbr class="published" title="2013-11-28T00:00:00">
        <i class="icon-calendar"></i>周四 28 十一月 2013
</abbr>
<span class="label">By</span>
<a href="../author/zendwind.html"><i class="icon-user"></i>Zendwind</a>
<!--
<span class="label">Category</span>
<a href="../category/about.html"><i class="icon-folder-open"></i>About</a>.
-->

<span class="label">Tags</span>
	<a href="../tag/about.html"><i class="icon-tag"></i>about</a>
</footer><!-- /.post-info --></div>
                <div class="summary"><h3>&nbsp;&nbsp;&nbsp;&nbsp;本人目前就读于西南某邮电学校，计算机小硕，毕业即将踏入国内某互联网公司TX从事技术运维工作，闲暇之余喜爱捣鼓各类IT技术，本博客主要是为记录自己的学习、生活及工作心得，欢迎大家拍砖</h3>
<h3>QQ： 553478282</h3>
<h3>微信：zend_wind</h3>
<h3>微信公众账号:zenwind, 各类生活服务类查询功能</h3>
                        <a class="btn primary xsmall" href="../pages/2013/11/28/about-me.html">more ...</a>
                </div>
        </div>
        <hr />
        <div class="article">
                <h1><a href="../pages/2013/11/27/git_push_non_user_pwd.html">Git Push 避免用户名和密码方法</a></h1>
                <div class="well small"><footer class="post-info">
<span class="label">Date</span>
<abbr class="published" title="2013-11-27T00:00:00">
        <i class="icon-calendar"></i>周三 27 十一月 2013
</abbr>
<span class="label">By</span>
<a href="../author/zendwind.html"><i class="icon-user"></i>Zendwind</a>
<!--
<span class="label">Category</span>
<a href="../category/git.html"><i class="icon-folder-open"></i>GIT</a>.
-->

<span class="label">Tags</span>
	<a href="../tag/git.html"><i class="icon-tag"></i>git</a>
	<a href="../tag/push.html"><i class="icon-tag"></i>push</a>
</footer><!-- /.post-info --></div>
                <div class="summary"><h2>Git Push 避免用户名和密码方法</h2>
<p>在Git push过程中每次都要输入用户名和密码，真是恼火，严重降低了效率，本文从网上找了两中方法进行尝试，都可以避免这种情况，接下来将依次介绍在windows环境中的应用（Linux环境类似）。
<h4><font color="blue">1.方法一</font></h4></p>
<p><strong>1.1 创建文件存储GIT用户名和密码</strong></p>
<p>在%HOME%目录中，一般为C:\users\Administrator，也可以是你自己创建的系统用户名目录，反正都在C:\users\中。文件名为.git-credentials,由于在Window中不允许直接创建以"."开头的文件，所以需要借助git bash进行，打开git bash客户端，进行%HOME%目录，然后用touch创建文件 .git-credentials, 用vim编辑此文件，输入内容格式：</p>
<p><code>touch .git-credentials</code></p>
<p><code>vim .git-credentials</code></p>
<p><code>https://{username}:{password}@github.com ...</code></p>
                        <a class="btn primary xsmall" href="../pages/2013/11/27/git_push_non_user_pwd.html">more ...</a>
                </div>
        </div>
        <hr />
        <div class="article">
                <h1><a href="../pages/2013/11/26/pelican-install.html">pelican 在Windows环境下的安装配置</a></h1>
                <div class="well small"><footer class="post-info">
<span class="label">Date</span>
<abbr class="published" title="2013-11-26T00:00:00">
        <i class="icon-calendar"></i>周二 26 十一月 2013
</abbr>
<span class="label">By</span>
<a href="../author/zendwind.html"><i class="icon-user"></i>Zendwind</a>
<!--
<span class="label">Category</span>
<a href="../category/python.html"><i class="icon-folder-open"></i>Python</a>.
-->

<span class="label">Tags</span>
	<a href="../tag/pelican.html"><i class="icon-tag"></i>pelican</a>
</footer><!-- /.post-info --></div>
                <div class="summary"><h2>Pelican 在Windows环境下的安装及配置</h2>
<p><strong>前言</strong></p>
<p>此篇博客主要为Pelican的配置安装所写，在此过程中主要参考资料<a href="http://www.yanyulin.info/pages/2013/11/pelican.html">烟雨林博客</a>、<a href="http://blog.csdn.net/poem_of_sunshine/article/details/12913325">poem_of_sunshine</a>和<a href="http://frantic1048.com/bo-ke-dan-sheng-ji-ji-yu-githubpelicanchuang-jian-bo-ke-de-zheng-ge-guo-cheng.html">frantic1048</a>，他们写得都很好，内容流程完善，但在具体实施过程中小白还是会遇到很多问题，因此本文结合现有的教程，再进一步指出整个操作过程中所可能遇到的问题，也为自己留个纪念。 </p>
<p><strong>本文架构</strong></p>
<p>本文将从以下几个方面进行描述：</p>
<ul>
<li><a href="#install_env">安装环境</a><ul>
<li><a href="#env_win">windows安装环境</a></li>
<li><a href="#soft_install">安装软件系列</a></li>
</ul>
</li>
<li><a href="#install_step">安装步骤</a><ul>
<li><a href="#install_python">python安装</a></li>
<li><a href="#install_setuptools">setuptools安装</a></li>
<li><a href="#install_pip">pip安装</a></li>
<li><a href="#install_git">Git Bash安装</a></li>
<li><a href="#install_pelican">pelican安装</a></li>
<li><a href="#install_markdownpad">markdownpad2安装</a></li>
<li><a href="#install_make">make安装</a></li>
</ul>
</li>
<li><a href="#config_pelican">Pelican配置</a><ul>
<li><a href="#config_git">远程仓库配置</a></li>
<li><a href="#config_regular">常规配置</a></li>
<li><a href="#config_special">进阶配置</a></li>
</ul>
</li>
<li><a href="#blog_write">Markdown博客编写</a></li>
<li><a href="#error_correct">安装配置出错问题集绵</a><ul>
<li><a href="#error_setuptools">setuptools问题</a></li>
<li><a href="#error_pelican">pelican握手超时问题</a></li>
<li><a href="#error_git">git pull&amp;push问题</a></li>
<li><a href="#error_makefile">Makefile问题</a></li>
<li><a href="#error_code_red">code block红框问题</a></li>
</ul>
</li>
<li><a href="#summary">总结</a></li>
</ul>
<h2 id="install_env">安装环境</h2>

<h3 id="env_win">Windows安装环境</h3>

<p>本文基于Windows7 32位操作系统
<h3 id="soft_install">安装软件系列</h3>
在整个安装配置过程中 ...</p>
                        <a class="btn primary xsmall" href="../pages/2013/11/26/pelican-install.html">more ...</a>
                </div>
        </div>
        <hr />

        </div><!--/span-->
		
        <div class="span3 well sidebar-nav" id="sidebar">
<ul class="nav nav-list">
<li class="nav-header"><h4>分类目录</h4></li>
<hr color=#987cb9 SIZE=3 />
<li>
	<a href="../category/about.html">
		About
	</a>	
</li>
<li>
	<a href="../category/git.html">
		GIT
	</a>	
</li>
<li>
	<a href="../category/python.html">
		Python
	</a>	
</li>

<li class="nav-header"><h4>标签云</h4></li>
<hr color=#987cb9 SIZE=3 />
<a href="../tag/pygame.html">
        pygame&nbsp;&nbsp;
</a>
<a href="../tag/eclipse.html">
        eclipse&nbsp;&nbsp;
</a>
<a href="../tag/pelican.html">
        pelican&nbsp;&nbsp;
</a>
<a href="../tag/django.html">
        Django&nbsp;&nbsp;
</a>
<a href="../tag/push.html">
        push&nbsp;&nbsp;
</a>
<a href="../tag/about.html">
        about&nbsp;&nbsp;
</a>
<a href="../tag/git.html">
        git&nbsp;&nbsp;
</a>
<br />
<br />
<li class="nav-header"><h4>友情链接</h4></li>
<hr color=#987cb9 SIZE=3 />
    <li><a href="http://bbs.chinaunix.net/forum.php?gid=277" target=_blank>ChinaUnix运维专栏</a></li>
    <li><a href="http://bbs.linuxtone.org/forum.php" target=_blank>LinuxTone运维专栏</a></li>
    <li><a href="http://wiki.saltstack.cn/" target=_blank>SaltStack维基-自动化运维</a></li>
    <li><a href="http://www.huxiu.com/" target=_blank>虎嗅网-商业资讯与交流平台</a></li>
    <li><a href="http://www.36kr.com/" target=_blank>36氪-互联网创业</a></li>


</ul>        </div><!--/.well -->
		<!--add by zendwind-->
		<div class="span9" id="content">
			<hr size=2>
<!-- Baidu Button BEGIN -->
<div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">

<a class="bds_qzone"></a>
<a class="bds_tsina"></a>
<a class="bds_tqq"></a>
<a class="bds_renren"></a>
<a class="bds_t163"></a>
<span class="bds_more"></span>
</div>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=0" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<!-- Baidu Button END -->		</div>
		
		<div class="span9" id="content">
			<hr size=2>

<!-- Duoshuo Comment BEGIN -->
<div class="ds-thread"></div>
<script type="text/javascript">
var duoshuoQuery = {short_name:"zendwind"};
	(function() {
		var ds = document.createElement('script');
		ds.type = 'text/javascript';ds.async = true;
		ds.src = 'http://static.duoshuo.com/embed.js';
		ds.charset = 'UTF-8';
		(document.getElementsByTagName('head')[0] 
		|| document.getElementsByTagName('body')[0]).appendChild(ds);
	})();
	</script>
<!-- Duoshuo Comment END -->		</div>
		 
      </div><!--/row-->
	   
      <hr>

      <footer>
        <address id="about">
        <<center>Power by Pelican, Copyright@ <a href="http://www.zendwind.com">ZendWind</a></center>
        </address><!-- /#about -->
		<p><center> @ZendWind Personal Blog </center></p>
      </footer>

    </div><!--/.fluid-container-->


<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
	var pageTracker = _gat._getTracker("UA-46020847-1");
pageTracker._trackPageview();
} catch(err) {}</script>
	

    <!-- Le javascript -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="../theme/js/jquery-1.7.2.min.js"></script>
    <script src="../theme/js/bootstrap.min.js"></script>
  </body>
</html>